This guide pertains to the application A Visual Representation of the Saddlepoint Approximation. The code can be found here, and you can use the application here.
I will assume knowledge of exponential tilting and the saddlepoint approximation in this guide – for more information about these topics there is more elaboration in my full thesis which can be found here.
Here, I will give an overview of the point of this application in written form. If you would rather watch a video instead (it is perhaps easier to understand some of these concepts with a visual aid) then the exact same information is included in video form at the end of this chapter.
The aim of this application is to help visualise the saddlepoint approximation via comparison to a simulated approximation of the true density. It (hopefully) illustrates how the saddlepoint approximation is generated, particularly with reference to exponential tilting.
In the upper panel of the application, we have a scatterplot. The \(x\)-coordinate of each points are randomly generated values from some chosen distribution \(f(x)\) (selected in the sidebar) whilst the \(y\)-axis shows a Poisson point process with rate 1.
In the “saddlepoint approximation” plot, we can see what is labelled the “simulated line” coloured in black. This is the kernel density estimate of the \(x\)-values of all the simulated points (including those not on screen). We can compare this simulated distribution to both the true probability density function \(f(x)\) (in yellow) and its saddlepoint approximation (in blue). Usually, we can see that the saddlepoint approximation fits the true distribution much more closely in the tails.
We have a slider for \(s\) in the sidebar. Selecting \(s=s_0\) will map each \((x,y)\) in the scatterplot to \((x, mye^{-s_0x})\), where \(m\) is the moment generating function for the chosen distribution. Due to the particular way that we have defined the \(y\) coordinates, it can be shown that in doing this transformation, the kernel density (on the \(x\)-axis) of visible points in the scatterplot approximates the \(s_0\)-tilted distribution of the chosen distribution \(f(x)\) (provided enough points are simulated).
We can see this illustrated in the “tilted distribution” plot. The thin yellow line shows the true tilted distribution (this is the probability density function of the chosen distribution \(f(x)\), tilted by \(s_0\)), which we can compare to the black line, which shows the kernel density estimate of the simulated points that are visible on the screen. The true tilted distribution can be approximated by a normal distribution (the thin line coloured in blue). Note that can be found for distributions even if the true tilted density is unknown.
Now, suppose we wish to find the saddlepoint approximation to the chosen distribution \(f(x)\) at \(x = K'(s_0)\). Doing this is the same as doing the following:
So, at the selected value of \(s_0\), the crosshairs marked on the “tilted distribution”, which point to the value of the normal approximation to the tilted distribution at the mean \(K'(s_0)\), give the value that, when untilted, is the saddlepoint approximation at \(K'(s_0)\). We can also see the corresponding (untilted) value – these are the crosshairs on the “saddlepoint approximation” plot.
In the “tilted distribution” plot, the thick yellow line traces out the mean of the true tilted distribution for all \(s\). The thick blue line traces out the mean of the normal approximation to the true tilted distribution for all \(s\). It is the case that when this thick blue line is back-transformed (i.e. untilted), it gives us the saddlepoint approximation (i.e. the blue line in the “saddlepoint approximation” plot).
A short video containing the same information as above (but this time with visuals!) is included below: